<!DOCTYPE HTML>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head th:include="console/header">
</head>
<body>
<section class="content">
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title" th:text="'角色'+${#strings.isEmpty(role.roleId)?'添加':'修改'}"></h3>
                </div>
                <div class="box-body">
                    <form class="form-horizontal js-ajax-form" action="/console/role/save" method="post">
                        <input type="hidden" name="roleId" th:value="${role.roleId}" />
                        <input type="hidden" name="createdAt" th:value="${role.createdAt}" />
                        <input type="hidden" name="updatedAt" th:value="${role.updatedAt}" />
                        <div class="form-group">
                            <label for="roleName" class="col-sm-2 control-label">角色名称</label>
                            <div class="col-sm-10">
                                <input type="text" name="roleName" class="form-control" id="roleName" required="true" th:value="${role.roleName}" placeholder="请输入角色名称" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="roleDesc" class="col-sm-2 control-label">角色说明</label>
                            <div class="col-sm-10">
                                <input type="text" name="roleDesc" class="form-control" id="roleDesc" th:value="${role.roleDesc}" placeholder="请输入角色说明" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否启用</label>
                            <div class="col-sm-10">
                                <select name="enable" class="form-control">
                                    <option value="1" th:selected="${role.enable eq 1}">是</option>
                                    <option value="0" th:selected="${role.enable eq 0}">否</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="console/footer"></div>

</body>
</html>